package pro.cherish.knowledgeumldesignpattern.designPattern.com.cherish.chainOfResp;
//c抽象类
public abstract class Leader {
    protected String name;
    protected Leader nextLeader;

    public Leader(String name) {
        super();
        this.name = name;
    }

    public Leader getNextLeader() {
        return nextLeader;
    }
//设置责任链的下一个方法
    public void setNextLeader(Leader nextLeader) {
        this.nextLeader = nextLeader;
    }
//    处理请求的核心抽像方法
    public abstract void handleRequest(LeaveRequest request);
}


